package com.earthea.scaffold.system.entity.request;

import com.earthea.scaffold.common.validator.PasswordValidator;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 用户注册对象
 */
@Data
public class UpdatePwdReq {

    /**
     * 老密码
     */
    @NotBlank(message = "老密码不能为空")
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Size(min = 8, max = 20, message = "新密码长度必须在8到20个字符之间")
    @PasswordValidator
    private String newPassword;
}
